home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / turbotut.arc / ARRAYS.PAS < prev    next >
Pascal/Delphi Source File  |  1989-06-30  |  412b  |  17 lines

  1. PROGRAM simple_arrays;
  2.  
  3. VAR count,index : INTEGER;
  4.     automobiles : ARRAY[1..12] OF INTEGER;
  5.  
  6. BEGIN
  7.   FOR index := 1 TO 12 DO
  8.     automobiles[index] := index + 10;
  9.   WRITELN('This is the first program with an array');
  10.   WRITELN;
  11.   FOR index := 1 TO 12 DO
  12.     WRITELN('automobile number',index:3,' has the value',
  13.              automobiles[index]:4);
  14.   WRITELN;
  15.   WRITELN('End of program');
  16. END.
  17.